/*
 * Copyright 2021 The Chromium Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

:host {
  --override-node-text-label-color: var(--color-syntax-2);
  --override-node-text-class-color: var(--color-syntax-4);
  --override-node-text-id-color: var(--color-syntax-4);
  --override-node-text-multiple-descriptors-id: var(--color-syntax-7);
  --override-node-text-multiple-descriptors-class: var(--color-syntax-4);
}

.crumbs {
  display: inline-flex;
  align-items: stretch;
  width: 100%;
  overflow: hidden;
  pointer-events: auto;
  cursor: default;
  white-space: nowrap;
  position: relative;
  background: var(--color-background);
  font-size: inherit;
  font-family: inherit;
}

.crumbs-window {
  flex-grow: 2;
  overflow: hidden;
}

.crumbs-scroll-container {
  display: inline-flex;
  margin: 0;
  padding: 0;
}

.crumb {
  display: block;
  padding: 0 7px;
  line-height: 23px;
  white-space: nowrap;
}

.overflow {
  padding: 0 7px;
  font-weight: bold;
  display: block;
  border: none;
  flex-grow: 0;
  flex-shrink: 0;
  text-align: center;
  background-color: var(--color-background-elevation-1);
  color: var(--color-text-secondary);
  margin: 1px;
  outline: var(--color-background-elevation-1) solid 1px;
}

.overflow.hidden {
  display: none;
}

.overflow:disabled {
  opacity: 50%;
}

.overflow:focus {
  outline-color: var(--color-primary);
}

.overflow:not(:disabled):hover {
  background-color: var(--color-background-elevation-2);
  color: var(--color-text-primary);
  cursor: pointer;
}

.crumb-link {
  text-decoration: none;
  color: inherit;
}

.crumb:hover {
  background: var(--color-background-elevation-2);
}

.crumb.selected {
  background: var(--color-background-elevation-1);
}

.crumb:focus {
  outline: var(--color-primary) auto 1px;
}
